<template>
	<view>
		<web-view ref="webview" :src="src"></web-view>
	</view>
</template>

<script>
	import {
		baseEnv,
		payment,
		time,
		createMd5
	} from '@/utils/config.js';
	export default {
		data() {
			return {
				src: ""
			}
		},
		onLoad(option) {
			const type = option.type;
			const pay_mode = option.pay_mode;
			const token = uni.getStorageSync('token');
			const timestamp = time();
			const autograph = createMd5();
			// const params =
			// 	`id=${option.id}&token=${token}&type=${type}&pay_mode=${pay_mode}&env=${baseEnv}&timestamp=${timestamp}&autograph=${autograph}`;
			const params = `id=${option.id}&token=${token}&type=${type}&pay_mode=${pay_mode}&env=${baseEnv}`;

			this.src = `${payment}?${params}`;
		},
		methods: {}
	}
</script>

<style>
</style>
